import "./index.scss";
export default defineComponent({
	setup() {
		const deviceTotal: any = inject("deviceTotal");
		return () => {
			return (
				<div class="overview grid grid-cols-2">
					<div class="data-item flex items-center">
						<div class="icon icon-1"></div>
						<div class="data-info">
							<div class="data-title">工作站</div>
							<div class="data-value">
								<span class="value">1</span>
								<span class="unit">个</span>
							</div>
						</div>
					</div>

					<div class="data-item flex items-center">
						<div class="icon icon-2"></div>
						<div class="data-info">
							<div class="data-title">今日电量</div>
							<div class="data-value">
								<span class="value">545</span>
								<span class="unit">KW</span>
							</div>
						</div>
					</div>

					<div class="data-item flex items-center">
						<div class="icon icon-3"></div>
						<div class="data-info">
							<div class="data-title">设备</div>
							<div class="data-value">
								<span class="value">{deviceTotal?.total || 0}</span>
								<span class="unit">个</span>
							</div>
						</div>
					</div>

					<div class="data-item flex items-center">
						<div class="icon icon-4"></div>
						<div class="data-info">
							<div class="data-title">告警</div>
							<div class="data-value">
								<span class="value">{deviceTotal?.alarmTotal || 0}</span>
								<span class="unit">个</span>
							</div>
						</div>
					</div>
				</div>
			);
		};
	}
});
